package com.blacksee.bluetoothpoker.network.messages;

import com.blacksee.bluetoothpoker.logic.net.mypapit.java.StringTokenizer;

public class HandValueMessage implements NetMessage {
	
	private int value;
	private int senderID;
	private String cards;
	
	public HandValueMessage(int senderId, int value){
		this.senderID = senderId;
		this.value = value;
	}
	
	public int getSenderID() {
		return senderID;
	}

	public int getValue() {
		return value;
	}

	public void parseParameters(String message) {
		StringTokenizer tok = new StringTokenizer(message);
		String messageHead = tok.nextToken();
		
		this.value = Integer.parseInt(tok.nextToken());
		this.cards = tok.nextToken();
	}

	public String GetMessageString() {
		String text = "HAND_VALUE*" + this.value + "*" + this.cards;
		return text;
	}
	
}
